package org.komarichin.beans;

import java.util.Date;

/**
 * Interface describe entry file
 * User: Mykhaylo Komarichyn
 * Date: 31.12.2009
 * Time: 10:40:43
 */
public interface IFile<PK> extends IGenericEntity<PK> {
    /**
     * @return file identifier
     */
    public PK getId();

    /**
     * @param id file identifier
     */
    public void setId(PK id);

    /**
     * @return file name
     */
    public String getName();

    /**
     * @param name file name
     */
    public void setName(String name);

    /**
     * @return content type for file
     */
    public String getContentType();

    /**
     * @param contentType content type for file
     */
    public void setContentType(String contentType);

    /**
     * @return file data
     */
    public byte[] getFile();

    /**
     * @param file file data
     */
    public void setFile(byte[] file);

    /**
     * @param folder folder where contain file - path
     */
    public void setFolder(String folder);

    /**
     * @return folder where contain file - path
     */
    public String getFolder();

    /**
     * @param type file type, can be image, flash ....
     */
    public void setType(String type);

    /**
     * @return file type, can be image, flash ....
     */
    public String getType();

    /**
     * @return length of file
     */
    public Long getLength();

    /**
     * @param length length of file
     */
    public void setLength(Long length);

    /**
     * @return data update of file
     */
    public Date getUpdate();

    /**
     * @param update data update of file
     */
    public void setUpdate(Date update);

    /**
     * @return check if entry is file then return true
     */
    public boolean isFile();

    /**
     * @return check if entry is folder then return true
     */
    public boolean isDirectory();
}
